package com.duanruan.bmgl.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.duanruan.bmgl.entity.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author xiaolong
 * @create 2020-08-21 14:06
 * @description 部门管理Mapper
 */
@Mapper
@Repository("DepartmentMapperbmgl")
public interface DepartmentMapper extends BaseMapper<Department> {

    //根据部门id查询员工
    @Select("SELECT COUNT(*) FROM employee WHERE departmentId = #{id}")
    public int selectEmployee(int id);

    public Department selectone(int id);

}
